package com.prothink.controller;

import com.prothink.entity.FenyeNode;
import com.prothink.entity.JsMicrocircle;
import com.prothink.entity.FenyeNode;
import com.prothink.entity.JsMicrocircle;
import com.prothink.service.JsMicrocicleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;


@Controller
@RequestMapping("/Microcicle")
@CrossOrigin

public class JsMicrocicleController {
    @Autowired
    private JsMicrocicleService jsMicrocicleService;
/**
 * @
 * @author Jin
 * @date 2022/11/12 16:24
 * @param [formInline]
 * @return com.prothink.entity.FenyeNode<com.prothink.entity.JsMicrocircle>
 */
    //查看微圈表数据
    @ResponseBody
    @PostMapping("/getMicrocicle")
    public FenyeNode<JsMicrocircle> getMicrocicle(@RequestBody JsMicrocircle formInline){
        System.out.println(formInline);
        return jsMicrocicleService.getMicrocicle(formInline);
    }
    /**
     * @
     * @author Jin
     * @date 2022/11/12 16:24
     * @param [id]
     * @return int
     */
//    根据id删除微圈表数据
    @ResponseBody
    @GetMapping("/delMicrocicle")
    public int delMicrocicle(Integer id){
        System.out.println(id);
        return jsMicrocicleService.delsplice(id);
    }
}
